<!-- 个人资料 -->
<!-- 校门 -->
<template>
	<view class="home-container">
		<view class="home-main">
			<!-- <image src="/static/images/logo.png" class="home-logo" mode=""></image> -->
			<view class="home-main-top">
				<view class="home-main-top-name flex-start">
					<text>姓名</text>
					<view class="">
						{{info.username}}
					</view>
				</view>
				<view class="home-main-top-type flex-start">
					<text>申请类型</text>
					<view class="">
						{{info.userType == '01'?'外来人员':info.userType == '02'?'老师':info.userType == '03'?'学生':info.userType == '04'?'校内人员':'门卫'}}
					</view>
				</view>
				<view class="home-main-top-type flex-start">
					<text>联系方式</text>
					<view class="">
						{{info.phone}}
					</view>
				</view>
				<view class="home-main-top-type flex-start">
					<text>所在学院</text>
					<view class="">
						{{info.academyName || '未填写'}}
					</view>
				</view>
				<view class="home-main-top-type flex-start">
					<text>所在班级</text>
					<view class="">
						{{info.gradeName || '未填写'}}
					</view>
				</view>
			</view>
			<!-- <view class="home-main-bottom">
				<view class="home-main-bottom-li">
					<text>手机号：</text>
					<view>{{base.userPhone || '未填写'}}</view>
				</view>
				<view class="home-main-bottom-li">
					<text>被访人：</text>
					<view>{{base.forUserName}}</view>
				</view>
				<view class="home-main-bottom-li">
					<text>被访人电话：</text>
					<view>{{base.forUserPhone}}</view>
				</view>
				
				<view class="home-main-bottom-li">
					<text>学院：</text>
					<view>{{base.forDeptName}}</view>
				</view>
				<view class="home-main-bottom-li">
					<text>申请理由：</text>
					<view>{{base.applyReason}}</view>
				</view>
				<view class="home-main-bottom-li">
					<text>离校时间：</text>
					<view>{{base.endDate}}</view>
				</view>
				<view class="home-main-bottom-li">
					<text>回校时间：</text>
					<view>{{base.startDate}}</view>
				</view>
				<view class="home-main-bottom-li">
					<text>申请时间：</text>
					<view>{{base.createTime}}</view>
				</view>
				<view class="home-main-bottom-li">
					<text>申请状态：</text>
					<view>{{base.applyStatus == 1?'申请中':base.applyStatus == 2?'审批中':base.applyStatus == 3?'申请通过':'已拒绝'}}</view>
				</view>
			</view> -->
		</view>
		
		<view class="home-main" style="margin-top: 26rpx;" v-if="showPhoto">
			<!-- <view class="home-main-s-t">
				用户身份
			</view> -->
			<view class="apply-main-updata flex">
				<view class="apply-main-updata-right">
					<image :src="info.idnumberContraryUrl?info.idnumberContraryUrl:'/static/images/campu-5.png'" mode="aspectFill"></image>
					<!-- <view>上传身份证正面照</view> -->
				</view>
				<view class="apply-main-updata-right">
					<image :src="info.idnumberFrontUrl?info.idnumberFrontUrl:'/static/images/campu-7.png'" mode="aspectFill"></image>
					<!-- <view>上传身份证反面照</view> -->
				</view>
			</view>
		</view>
		<view class="home-main" style="margin-top: 26rpx;" v-if="showPhoto">
			<!-- <view class="home-main-s-t">
				人脸
			</view> -->
			<view class="apply-main-rela" @click="getImg(1,4)">
				<image :src="info.photoUrl?info.photoUrl:'/static/images/campu-6.png'" mode="aspectFill"></image>
			</view>
		</view>
	</view>
</template>

<script>
	
	export default {
		// props:['info'],
		data() {
			return {
				base: {},
				info:{},
				showPhoto:false
			} 
		},
		mounted() {
			// 获取用户信息
			this.userinfo()
		},
		onLoad(option) {
			this.showPhoto = this.$db.get('showPhoto')
			// this.$api.detail({data:{applyId:option.applyId}}).then(res => {
			// 	this.base = res.data
			// }).catch(res => {})
		},
		methods:{
			userinfo(){
				this.$api.selfinfo().then(res=>{
					this.info = res.data
				}).catch(res=>{
					
				})
			},
		}
	}
</script>

<style lang="scss">
	.home-container {
		padding: 0 24rpx;
	}
	.home-main {
		position: relative;
		margin-top: 20rpx;
		border-radius:  12rpx;
		background-color: white;
		padding: 68rpx 42rpx 42rpx;
	}
	.home-logo {
		width: 160rpx;
		height: 160rpx;
		border-radius: 50%;
		position: absolute;
		right: 50%;
		top: -80rpx;
		margin-right: -80rpx;
		border: 2rpx solid #fff;
	}
	.apply-main-rela {
		padding-bottom: 44rpx;
		image {
			width: 222rpx;
			height: 258rpx;
			display: block;
			margin: 0 auto;
			border-radius: 8rpx;
		}
		view {
			width: 360rpx;
			color: #4D7CFB;
			margin: 0 auto;
			padding: 26rpx 0;
			margin-top: 24rpx;
			text-align: center;
			border-radius: 100rpx;
			border: 2rpx solid #4D7CFB;
		}
	}
	.home-main-top {
		border-bottom: 2rpx solid #979797;
		.home-main-top-name {
			margin-bottom: 30rpx;
			text {
				color: #4D7CFB;
				font-size: 34rpx;
				margin-right: 20rpx;
			}
			view {
				color: #3B3B3B;
				font-size: 28rpx;
				
			}
		}
		.home-main-top-type {
			margin-bottom: 30rpx;
			text {
				color: #797B87;
				font-size: 28rpx;
				margin-right: 20rpx;
			}
			view {
				color: #3B3B3B;
				
			}
		}
	}
	.home-main-bottom {
		margin-top: 36rpx;
		.home-main-bottom-li {
			display: flex;
			font-size: 28rpx;
			margin-bottom: 36rpx;
			justify-content: flex-start;
			view:  {
				color: #3B3B3B;
				
			}
			text {
				color: #797B87;
			}
			
		}
	}
	.imagesList {
		&::after{
			content: '';
			width: 200rpx;
		}
	}
	.home-main-s-t {
		color: #4D7CFB;
		font-size: 34rpx;
		font-weight: bold;
		padding-bottom: 15rpx;
		margin-bottom: 10rpx;
		border-bottom: 2px solid #F3F3F3; 
	}
	.images {
		padding: 20rpx 0;
		image{
			width: 200rpx;
			height: 120rpx;
		}
	}
	.home-main-l {
		font-size: 28rpx;
		padding-bottom: 36rpx;
		text  {
			
			color: #797B87;
			
			
		}
		view {
			color: #3B3B3B;
		}
	}
	.home-main-p {
		padding-bottom: 36rpx;
		border-bottom: 2px solid #979797;
		image {
			width: 290rpx;
			height: 210rpx;
			border-radius: 12rpx;
		}
	}
	.home-main-code {
		padding: 36rpx 0 42rpx 0;
		border-bottom: 2px solid #F3F3F3;
		image {
			width: 266rpx;
			height: 302rpx;
			display: block;
			margin: 0 auto;
		}
		view {
			color: #22C2A1;
			margin-top: 36rpx;
			text-align: center;
			image {
				width: 35rpx;
				height: 35rpx;
				margin: 0;
				margin-right: 8rpx;
			}
		}
	}
	.apply-main-updata {
		background-color: white;
		border-bottom: 2rpx dashed #979797;
		.apply-main-updata-right {
			margin: 58rpx 0;
			
		}
		image {
			width: 264rpx;
			height: 164rpx;
			border-radius: 8rpx;
		}
		view {
			color: #797B87;
			font-size: 26rpx;
			margin-top: 20rpx;
			text-align: center;
		}
	}
	
	
	
	
	
	
</style>

